package org.jeecg.modules.sggg.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.sggg.entity.SgTreatmentAssist;
import org.jeecg.modules.sggg.mapper.SgTreatmentAssistMapper;
import org.jeecg.modules.sggg.service.ISgTreatmentAssistService;
import org.jeecg.modules.system.entity.SysUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;
import java.util.Map;

/**
 * @Description: 三高协诊
 * @Author: jeecg-boot
 * @Date: 2022-10-26
 * @Version: V1.0
 */
@Service
public class SgTreatmentAssistServiceImpl extends ServiceImpl<SgTreatmentAssistMapper, SgTreatmentAssist> implements ISgTreatmentAssistService {

    @Autowired
    private SgTreatmentAssistMapper sgTreatmentAssistMapper;

    @Override
    public IPage<SgTreatmentAssist> queryList(Page<SgTreatmentAssist> page, SgTreatmentAssist sgTreatmentAssist, String orgCode, String userId, String roleCode) {
        return sgTreatmentAssistMapper.queryList(page, sgTreatmentAssist.getName(), sgTreatmentAssist.getIdCard(), sgTreatmentAssist.getPhone(),sgTreatmentAssist.getResponsibleAgencies(), sgTreatmentAssist.getMemberId(), orgCode, userId, roleCode);
    }

    @Override
    public IPage<SgTreatmentAssist> queryReceiveList(Page<SgTreatmentAssist> page, SgTreatmentAssist sgTreatmentAssist, String orgCode, String roleCode, String userId) {
        return sgTreatmentAssistMapper.queryReceiveList(page, sgTreatmentAssist.getName(), sgTreatmentAssist.getIdCard(), sgTreatmentAssist.getPhone(),sgTreatmentAssist.getResponsibleAgencies(), sgTreatmentAssist.getMemberId(), orgCode, roleCode, userId);

    }

    @Override
    public IPage<SgTreatmentAssist> queryTreatmentList(Page<SgTreatmentAssist> page, SgTreatmentAssist sgTreatmentAssist, String orgCode,String roleCode,String userId) {
        return sgTreatmentAssistMapper.queryTreatmentList(page, sgTreatmentAssist.getName(), sgTreatmentAssist.getIdCard(), sgTreatmentAssist.getPhone(),sgTreatmentAssist.getResponsibleAgencies(), sgTreatmentAssist.getMemberId(), orgCode,roleCode,userId);
    }

    @Override
    public IPage<SgTreatmentAssist> queryUpReferralList(Page<SgTreatmentAssist> page, SgTreatmentAssist sgTreatmentAssist) {
        return sgTreatmentAssistMapper.queryUpReferralList(page, sgTreatmentAssist.getId());
    }

    @Override
    public IPage<SgTreatmentAssist> queryDownReferralList(Page<SgTreatmentAssist> page, SgTreatmentAssist sgTreatmentAssist) {
        return sgTreatmentAssistMapper.queryDownReferralList(page, sgTreatmentAssist.getId());
    }

    @Override
    public List<SysUser> getAdminUser(String orgCode) {
        return sgTreatmentAssistMapper.getAdminUser(orgCode);
    }

    @Override
    public List<Map<String, Object>> yearConsultation(String orgCode, String createTime, String updateTime) {
        return sgTreatmentAssistMapper.yearConsultation(orgCode, createTime, updateTime);
    }

    @Override
    public List<SgTreatmentAssist> selectyByMemberIdList(String member_id,String status) {
        return sgTreatmentAssistMapper.selectyByMemberIdList(member_id,status);
    }
}
